Skip to content

fix(chat): prevent offline message send from hanging and creating empty bubbles#1003

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/offline-message-send
Jun 26, 2026
Merged

fix(chat): prevent offline message send from hanging and creating empty bubbles#1003
bmc08gt merged 1 commit into
code/cashfrom
fix/offline-message-send

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Restructure SharedFlow event handlers to use fire-and-forget pattern (viewModelScope.launch) for network calls, preventing backpressure from blocking all event delivery when any gRPC call hangs offline. Capture text and clear input synchronously on Main thread via flowOn before launching the send coroutine.

Add 30s gRPC deadline to sendMessage so pending bubbles transition to FAILED status instead of hanging indefinitely. Add tap-to-retry flow for failed messages with in-place status update (FAILED→SENDING) to avoid UI jitter. Guard against blank message sends at both VM and coordinator layers.

@bmc08gt bmc08gt self-assigned this Jun 26, 2026
@github-actions github-actions Bot added type: fix Bug fix area: network gRPC, connectivity, API, exchange rates and removed type: fix Bug fix labels Jun 26, 2026
…ty bubbles

Restructure SharedFlow event handlers to use fire-and-forget pattern
(viewModelScope.launch) for network calls, preventing backpressure from
blocking all event delivery when any gRPC call hangs offline. Capture
text and clear input synchronously on Main thread via flowOn before
launching the send coroutine.

Add 30s gRPC deadline to sendMessage so pending bubbles transition to
FAILED status instead of hanging indefinitely. Add tap-to-retry flow
for failed messages with in-place status update (FAILED→SENDING) to
avoid UI jitter. Guard against blank message sends at both VM and
coordinator layers.

Signed-off-by: Brandon McAnsh <[email protected]>
@bmc08gt bmc08gt force-pushed the fix/offline-message-send branch from 04f60ad to 2d6d802 Compare June 26, 2026 20:32
@github-actions github-actions Bot added the type: fix Bug fix label Jun 26, 2026
@bmc08gt bmc08gt merged commit 2386cc8 into code/cash Jun 26, 2026
2 checks passed
@bmc08gt bmc08gt deleted the fix/offline-message-send branch June 26, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant